import request from '@/utils/request'
import qs from 'qs';

export function getCourseList() {
  return request({
    url: '/course/getCourseList',
    method: 'get',
  })
}
export function getAllCourse() {
  return request({
    url: '/course/getAllCourse',
    method: 'get',
  })
}

export function getAllSCInfo() {
  return request({
    url: '/course/getAllSCInfo',
    method: 'get',
  })
}

export function addCourse(data) {
  console.log(data)
  return request({
    url: '/course/addCourse',
    method: 'post',
    data
  })
}

export function updateCourse(data) {
  return request({
    url: '/course/updateCourse',
    method: 'post',
    data
  })
}

export function deleteCourse(cId) {
  return request({
    url: '/course/deleteCourse',
    method: 'get',
    params: {cId}
  })
}

export function search(keyWord){
  return request({
    url: '/course/search',
    method: 'get',
    params: { keyWord }
  })
}